import request from '@/utils/request'

// 获取角色列表
export function getRoleList() {
  return request({
    url: '/role/list',
    method: 'get'
  })
}

// 获取角色菜单
export function getRoleMenus(roleId: number) {
  return request({
    url: `/role/${roleId}/menus`,
    method: 'get'
  })
}

// 更新角色菜单
export function updateRoleMenus(roleId: number, menuIds: number[]) {
  return request({
    url: `/role/${roleId}/menus`,
    method: 'put',
    data: menuIds
  })
} 

export default {}